<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}"/>
    <link rel="stylesheet" href="${resource(dir: 'css/blueprint', file: 'main.css')}"/>
    <link rel="stylesheet" href="${resource(dir: 'css/blueprint', file: 'screen.css')}"/>
    <link rel="stylesheet" href="${resource(dir: 'css/blueprint', file: 'print.css')}"/>
    <!--[if lt IE 8]><link rel="stylesheet" href="${resource(dir: 'css/blueprint', file: 'ie.css')}" /><![endif]-->

    <title>Timesheet for ${contractor.name} for the week of ${workWeekInstance.startDate}</title>
</head>
<body>
<div class="container showgrid">
    <div class='locationOfInvoice'>
        <div class='timesheet'>Timesheet</div>
        <div class='address'>Medina Chambers</div>
        <div class='address'>Town Quay</div>
        <div class='address'>Southampton</div>
        <div class='address'>SO14 2AQ</div>
        <div class='address'>T:  +44 (0) 20 7588 9978</div>
        <div class='address'>F:  +44 (0) 20 7588 9977</div>
        <div class='address'>E:  s.fitzpatrick@hurstuk.com</div>
        <div class='address'>W:  www.hurstuk.com</div>
    </div>


    <div class="contractorInfo">
        <div class='span-5 append-1'>The Contractor (or Ltd Co):</div><div class='span-4 underline'>${contractor.name}</div> <div class='span-4 '>Contractor/Vendor No:</div><div class='span-4 append-4 last underline'>${contractor.vendorNumber}</div>
        <div class='span-5 append-1'>Job Title:</div><div class='span-4 underline'>${contractor.jobTitle}</div> <div class='span-4 '>Week Commencing</div><div class='span-2 append-4 last underline'>${workWeekInstance.startDate}</div>
        <div class='span-5 append-1'>Client Name:</div><div class='span-4 underline'>${contractor.clientName}</div> <div class='span-4 '>Managers name</div><div class='span-2 append-4 last underline'>${contractor.manager.name}</div>
    </div>

    <table class="invoiceTable" border="1">
        <tr>
            <th>Day</th>
            <th>Start</th>
            <th>Break</th>
            <th>End</th>
            <th>Total</th>
            <th>Travel</th>
            <th>Accom</th>
            <th>Meals</th>
            <th>Telephone</th>
            <th>Total</th>
        </tr>
        <g:each var="dayOfWeek" status="status" in="${['monday', 'tuesday', 'wednesday', 'thursday', 'friday']}">
        <tr>
            <td class="dayOfWeek">${dayOfWeek}</td>
            <td>${workWeekInstance."$dayOfWeek".numOfHours > 0 ? '9:30' : '0'}</td>
            <td>0</td>
            <td>${workWeekInstance."$dayOfWeek".numOfHours > 0 ? '5:30' : '0'}</td>
            <td>${workWeekInstance."$dayOfWeek".numOfHours}</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
            <td>0</td>
        </tr>
        </g:each>

        <tr>
            <td colspan="4">Total number of hours worked</td>
            <td>${workWeekInstance.totalHours}</td>
        </tr>
        <tr>
            <td colspan="4"><b>Appointee’s Signature:</b>I confirm that this is an accurate account of my hours and expenses and that I have attached relevant receipts.</td>
            <td colspan="6"><b>Client’s Confirmation:</b>I confirm that the total hours and expenses shown above shall be invoiced to my company at the agreed rate and that the work is satisfactory Hurst UK Limited Business Terms have been received and once authorisation has been granted, payment must occur</td>
        </tr>
    </table>
    <div class="contractorInfo">
        <div class='span-1 append-1'>Signature</div><div class='span-4'><img src="${createLink(controller:'image', action:"contractor", id:contractor.id)}"/></div> <div class='span-2'>Signature</div><div class='span-3'><img src="${createLink(controller:'image', action:"manager", id:contractor.manager.id)}"/></div><div class='span-4 last'>Title: Scrummaster</div>
    </div>

</div>
</body>
</html>